package com.weijian.demo1.model;

import lombok.Data;
import java.time.LocalDateTime;
import io.swagger.v3.oas.annotations.media.Schema;

@Data
@Schema(description = "文档编辑消息实体")
public class DocumentEditMessage {
    @Schema(description = "文档ID", example = "1")
    private Long documentId;
    
    @Schema(description = "用户ID", example = "1")
    private Long userId;
    
    @Schema(description = "用户名", example = "张三")
    private String username;
    
    @Schema(description = "文档内容", example = "这是更新的文档内容...")
    private String content;
    
    @Schema(description = "时间戳")
    private LocalDateTime timestamp;
    
    @Schema(description = "消息类型", example = "EDIT")
    private String type; // EDIT, CURSOR, JOIN, LEAVE
    
    @Schema(description = "光标位置", example = "15")
    private Integer cursorPosition; // 光标位置
    
    @Schema(description = "版本号，用于冲突解决", example = "123456789")
    private Long version; // 版本号，用于冲突解决
}